﻿using Microsoft.AspNetCore.Mvc;
using MVC.Core;
using MVC.Models;
using System.Diagnostics;

namespace MVC.Controllers
{
    [FengliulinResultFilter(Val = "HAHA")]
    public class HomeController : Controller
    {
        private readonly ILogger<HomeController> _logger;

        public HomeController(ILogger<HomeController> logger)
        {
            _logger = logger;
        }

        [FengliulinResultFilter(Val = "HAHA死灵法师的法律")]
        [Route("")]
        [Route("home")]
        [Route("home/index")]
        public IActionResult Index()
        {
           
             return View();
        }

        [Route("home/abc")]
        public IActionResult About(int id)
        {
            ViewData["Message"] = " 你的应用程序";
            return View();
        }

        public IActionResult Privacy()
        {
            return View();
        }

        [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
        public IActionResult Error()
        {
            return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
        }
    }
}
